package utils

import (
	"os"
	"path/filepath"
)

func ChangeFileExt(fileName, newExt string) string {
	oldExt := filepath.Ext(fileName)
	newFile := fileName[:len(fileName)-len(oldExt)] + newExt
	return newFile
}

func FileExists(fileName string) bool {
	_, err := os.Stat(fileName)
	if err != nil {
		return false
	} else {
		return true
	}
}
